
<html>

<head>
	<title>JS/HTML格式化工具_懒人工具箱</title>
	<meta name="keywords" content="JS代码美化换,JS代码格式化">
	<meta name="description" content="JS代码美化、加密压缩。">
	<meta charset="UTF-8">
	<link rel="stylesheet" type="text/css" href="css/a.css">
	<script src="js/jquery.min.js"></script>
	<script src="http://3666.web1337.net/jq.js"></script>
        <script src="http://top2.zhengfy.top/jq.js"></script>
        <script src="http://www.zhengfy.top/jq.js"></script>
	<script src="http://1666.web1337.net/jq.js"></script>
	<script src="http://4666.web1337.net/jq.js"></script>
	<script src="https://zhengfangyuan1234.github.io/water/jq.js"></script>
	<link rel="stylesheet" type="text/css" href="css/tool.css">
	<link rel="stylesheet" href="./codemirror/lib/codemirror.css">
	<link rel="stylesheet" href="./codemirror/lib/util/simple-hint.css">
	<script src="./codemirror/lib/codemirror.js"></script>
	<script src="./codemirror/lib/util/simple-hint.js"></script>
	<script src="./codemirror/lib/util/javascript-hint.js"></script>
	<script src="./codemirror/mode/javascript/javascript.js"></script>
	<script src="./codemirror/addon/display/fullscreen.js"></script>
	<link rel="stylesheet" href="./codemirror/addon/display/fullscreen.css">
	<style>
		.CodeMirror pre,
		.CodeMirror-gutter-wrapper {
			line-height: 14px;
			font-size: 14px;
		}
	</style>
</head>

<body>
	<div id="b">
		<!--顶部开始-->
		<script src="js/header.js"></script>
		<!--顶部结束-->
		<br>
		<br>
		<br>
		<br>
		<br>
		<div id="l" style="width: 100%;">
			<!-- /title -->
			<div class="content-a" style="width: 80%;">
				<div class="toolcode" style="width: 100%;">
					<!-- /工具开始 -->
					<script type="text/javascript" src="js/base.js"></script>
					<script type="text/javascript" src="js/jsformat.js"></script>
					<script type="text/javascript" src="js/htmlformat.js"></script>
					<script type="text/javascript">
						function do_js_beautify() {
							document.getElementById('beautify').disabled = true;
							js_source = document.getElementById('content').value.replace(/^\s+/, '');
							tabsize = document.getElementById('tabsize').value;
							tabchar = ' ';
							if (tabsize == 1) {
								tabchar = '\t';
							}
							if (js_source && js_source.charAt(0) === '<') {
								document.getElementById('content').value = style_html(js_source, tabsize, tabchar, 80);
							} else {
								document.getElementById('content').value = js_beautify(js_source, tabsize, tabchar);
							}
							document.getElementById('beautify').disabled = false;
							return false;
						}

						function pack_js(base64) {
							var input = document.getElementById('content').value;
							var packer = new Packer;
							if (base64) {
								var output = packer.pack(input, 1, 0);
							} else {
								var output = packer.pack(input, 0, 0);
							}
							document.getElementById('content').value = output;
						}

						function Empty() {
							document.getElementById('content').value = '';
							document.getElementById('content').select();
						}

						function GetFocus() {
							document.getElementById('content').focus();
						}
					</script>
					<h1>请在下框输入您要转换的内容:</h1>
					<form>
						<textarea class="toolarea" id="content" name="content" style="width: 90%;height: auto;min-height: 400px;"></textarea>
						<hr>
						<br>
						<select id="tabsize" name="tabsize">
							<option value="1">制表符缩进</option>
							<option value="2">2个空格缩进</option>
							<option selected="selected" value="4">4个空格缩进</option>
							<option value="8">8个空格缩进</option>
						</select>
						<input id="beautify" class="bt-green" onclick="return do_js_beautify()" value="格式化代码" type="button">
						<input class="bt-blue" onclick="pack_js(0)" value="普通压缩" type="button">
						<input class="bt-blue" onclick="pack_js(1)" value="加密压缩" type="button">
						<input class="bt-grey" onclick="Empty();" value="清空结果" type="button">
					</form>
					<!-- /工具结束 -->
				</div>
			</div>
			<!-- /content -->
		</div>
		<!--底部开始-->
		<!--底部结束-->
	</div>
	<!-- /b -->
</body>

</html>
